<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>流动加载</title>

  <script src="../js/jszip.min.js"></script>
  <script src="../js/epub.js"></script>
  <link rel="stylesheet" href="css.css">
  <style type="text/css">

    .epub-container {
      min-width: 320px;
      margin: 0 auto;
      position: relative;
    }

    .epub-container .epub-view > iframe {
        background: white;
        box-shadow: 0 0 4px #ccc;
        /*margin: 10px;
        padding: 20px;*/
    }

  </style>
</head>
<body>

  <!-- https://futurepress.github.io/epub.js/examples/ -->

  <div id="viewer"></div>

  <script>
    var currentSectionIndex = 8;
    // Load the opf
    var book = ePub("../epub/自控力.epub");
    var rendition = book.renderTo(document.body, {
        manager: "continuous",
        flow: "scrolled",
        width: "60%"
      });
    var displayed = rendition.display();


    displayed.then(function(renderer){
      // -- do stuff
    });

    // Navigation loaded
    book.loaded.navigation.then(function(toc){
      // console.log(toc);
    });


  </script>

</body>
</html>
